package com.zhilian.hzrf_oa.mvp.main.presenter;

import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;

import com.colin.base.BasePresenter;
import com.colin.utils.LogUtil;
import com.zhilian.hzrf_oa.bean.UpdateBean;
import com.zhilian.hzrf_oa.mvp.main.model.IMainModel;
import com.zhilian.hzrf_oa.mvp.main.model.MainModel;
import com.zhilian.hzrf_oa.mvp.main.view.IMainView;
/**
 * Created by colin on 2018/2/8 9:22 .
 */

public class MainPresenter implements BasePresenter,IMainModel.Callback {
	private IMainView mView;
	private IMainModel mModel;

	public MainPresenter(IMainView view) {
		mView = view;
		mModel = new MainModel();
	}

	public void checkVersion(Context context) {
		mModel.checkVersion(context,this);
	}

	@Override
	public void onCheckVersion(UpdateBean model) {
		mView.updateApplication(model);
	}
}
